﻿using AutoMapper;
using BCDto.CRM.BigCustomer;
using BCDto.CRM.BigCustomerDriver;
using BCDto.CRM.BigCustomerFreightConfigExtention;
using BCDto.CRM.BigCustomerFreightConfiguration;
using BCDto.CRM.BigCustomerGroup;
using BCDto.CRM.CustomerFollowUpRecord;
using BCDto.CRM.CustomerInfo;
using BCDto.CRM.CustomerReceptionRecord;
using BCDto.CRM.EnterpriseInfomation;
using BCDto.CRM.IndustryCategory;
using BCEntity.CRM.BigCustomer;
using BCEntity.CRM.BigCustomerDriver;
using BCEntity.CRM.BigCustomerFreightConfigExtention;
using BCEntity.CRM.BigCustomerFreightConfiguration;
using BCEntity.CRM.BigCustomerGroup;
using BCEntity.CRM.CustomerFollowUpRecord;
using BCEntity.CRM.CustomerInfo;
using BCEntity.CRM.CustomerReceptionRecord;
using BCEntity.CRM.EnterpriseInfomation;
using BCEntity.CRM.IndustryCategory;

namespace BCService.MapperProfiles.SCM
{
    public class CRMProfile : Profile
    {
        public CRMProfile()
        {
            //大客户运费配置扩展

            CreateMap<BigCustomerFreightConfigExtentionRequestDto, BigCustomerFreightConfigExtentionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigExtentionDto, BigCustomerFreightConfigExtentionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigExtentionRequestDto, BigCustomerFreightConfigExtentionDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigExtentionPutDto, BigCustomerFreightConfigExtentionDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<BigCustomerFreightConfigExtentionEntity, BigCustomerFreightConfigExtentionDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigExtentionEntity, BigCustomerFreightConfigExtentionRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigExtentionDto, BigCustomerFreightConfigExtentionRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<BigCustomerFreightConfigExtentionViewEntity, BigCustomerFreightConfigExtentionViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();


            //大客户运费配置

            CreateMap<BigCustomerFreightConfigurationRequestDto, BigCustomerFreightConfigurationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigurationPutDto, BigCustomerFreightConfigurationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigurationDto, BigCustomerFreightConfigurationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigurationRequestDto, BigCustomerFreightConfigurationDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigurationEntity, BigCustomerFreightConfigurationDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigurationEntity, BigCustomerFreightConfigurationRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigurationDto, BigCustomerFreightConfigurationRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerFreightConfigurationViewEntity, BigCustomerFreightConfigurationViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();


            //专属司机

            CreateMap<BigCustomerDriverRequestDto, BigCustomerDriverEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerDriverRequestDto, BigCustomerDriverDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerDriverDto, BigCustomerDriverEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerDriverEntity, BigCustomerDriverDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerDriverEntity, BigCustomerDriverRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerDriverDto, BigCustomerDriverRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter(); 

            //客户跟进记录
            CreateMap<CustomerFollowUpRecordRequestDto, CustomerFollowUpRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerFollowUpRecordDto, CustomerFollowUpRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerFollowUpRecordRequestDto, CustomerFollowUpRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerFollowUpRecordEntity, CustomerFollowUpRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerFollowUpRecordEntity, CustomerFollowUpRecordRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerFollowUpRecordDto, CustomerFollowUpRecordRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //客户信息
            CreateMap<CustomerInfoRequestDto, CustomerInfoEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerInfoDto, CustomerInfoEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerInfoRequestDto, CustomerInfoDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerInfoEntity, CustomerInfoDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerInfoEntity, CustomerInfoRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerInfoDto, CustomerInfoRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //客户接待 
            CreateMap<CustomerReceptionRecordRequestDto, CustomerReceptionRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerReceptionRecordDto, CustomerReceptionRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerReceptionRecordRequestDto, CustomerReceptionRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerReceptionRecordEntity, CustomerReceptionRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerReceptionRecordEntity, CustomerReceptionRecordRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<CustomerReceptionRecordDto, CustomerReceptionRecordRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //行业类别
            CreateMap<IndustryCategoryDto, IndustryCategoryEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<IndustryCategoryRequestDto, IndustryCategoryPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<IndustryCategoryRequestDto, IndustryCategoryEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<IndustryCategoryPutDto, IndustryCategoryEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<IndustryCategoryEntity, IndustryCategoryDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //企业信息
            CreateMap<EnterpriseInfomationDto, EnterpriseInfomationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<EnterpriseInfomationRequestDto, EnterpriseInfomationPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<EnterpriseInfomationRequestDto, EnterpriseInfomationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<EnterpriseInfomationPutDto, EnterpriseInfomationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<EnterpriseInfomationEntity, EnterpriseInfomationDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();


            CreateMap<BigCustomerRequestDto, BigCustomerEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerDto, BigCustomerEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerRequestDto, BigCustomerDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerEntity, BigCustomerDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerEntity, BigCustomerRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerDto, BigCustomerRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<BigCustomerGroupRequestDto, BigCustomerGroupEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerGroupDto, BigCustomerGroupEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerGroupRequestDto, BigCustomerGroupDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerGroupPutDto, BigCustomerGroupDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerGroupEntity, BigCustomerGroupDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerGroupEntity, BigCustomerGroupRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<BigCustomerGroupDto, BigCustomerGroupRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();


            CreateMap<BigCustomerViewEntity, BigCustomerViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
